package com.itheima.mapper;

import com.itheima.pojo.Dept;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 *部门持久层接口
 * @author GY
 * @version V1.0
 * @date 2025-01-08 17:17
 */
@Mapper
public interface DeptMapper {
    // //手动映射结果
    // @Results(
    //         id = "DeptResultMap",
    //         value = {
    //
    //                 @Result(column = "id" , property = "id" ,id = true),
    //                 @Result(column = "name" , property = "name"),
    //                 @Result(column = "create_time" , property = "createTime"),
    //                 @Result(column = "update_time" , property = "updateTime" ),
    //         }
    // )
    List<Dept> queryAll();

    void delete(Integer id);

    void insert(Dept dept);

    void update(Dept dept);

    Dept queryById(Integer id);
}
